#import "PointOfInterestCollection.h"

// Shared instance of PointOfInterestCollection
static PointOfInterestCollection* sharedPointOfInterestCollection = nil;

/**
 * A PointOfInterestCollection is an object representing a
 * collection of points of interest.
 *
 * All objects in the collection must conform to the 
 * PersistentDataType protocol.
 *
 * @author      Justin Hollander
 * @version     0.7.0
 * @since       0.1.0
 * @see         PersistentDataType
 */
@implementation PointOfInterestCollection

/**
 * Retrieve the unique key used for archiving.
 *
 * @return  the key used for keyed archiving
 */
- (NSString*)getArchiveKey{
	@synchronized(self) {
		return @"4kmuoaj24506ms";
	}
}

/**
 * Retrieve the shared instance of the point of interest collection.
 *
 * @return  the shared instance of PointOfInterestCollection
 */
+ (PointOfInterestCollection*)sharedPointOfInterestCollection{
	@synchronized(self) {
		if (sharedPointOfInterestCollection == nil) {
			sharedPointOfInterestCollection = [[PointOfInterestCollection alloc] initWithFile:@"POIStore.dat" usingSubdirectory:@"POIData"];
		}
	}
	
	return self;
}

@end
